/**
 * Created by Lee on 2019/2/18.
 */
export default {
    //显示加载提示框
    showLoadingTip:function (payload,msg) {
        payload.loadingData.msg = msg;
        payload.loadingData.show = true;
    },
    //更改加载提示框
    updateLoadingTip:function (payload,msg,status) {
        payload.loadingData.msg = msg;
        payload.loadingData.status = status;
    },
    //删除加载提示框
    delLoadingTip:function (payload,msg,time) {
        setTimeout(function () {
            payload.loadingData.msg = msg;
            payload.loadingData.status = 'loading';
            payload.loadingData.show = false;
        },time)
    },
    /** 字符串处理类函数 **/
    //获取路由的首层,'/article/aa/bb'
    getRouteFirst(routeStr){
        let routeArr = routeStr.split('/');
        return '/'+routeArr[1];
    }
}